package com.cdut.logistics.service.impl.businesses;

import java.util.List;

import com.cdut.logistics.model.dao.businesses.NewsDao;
import com.cdut.logistics.model.entity.Model.News;
import com.cdut.logistics.service.interf.businesses.NewsService;

public class NewsServiceImp implements NewsService {
	/*
	 * (non-Javadoc)
	 * @see com.cdut.logistics.service.interf.businesses.NewsService#news_create(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
	 */
	public boolean news_create(String title,String url,String content,String img_id,String video_url,int sort)
	{
		
		boolean is_success = NewsDao.dao.news_create(title, url, content, img_id, video_url, sort);
		return is_success;
	}
	/*
	 * (non-Javadoc)
	 * @see com.cdut.logistics.service.interf.businesses.NewsService#news_search()
	 */
	public List<News> news_search()
	{
		List<News> list=NewsDao.dao.news_search();
		return list;
	}
	/*
	 * (non-Javadoc)
	 * @see com.cdut.logistics.service.interf.businesses.NewsService#news_search(int)
	 */
	public boolean news_delete(int news_id)
	{
		boolean is_success = NewsDao.dao.news_delete(news_id);
		return is_success;
	}
	public News news_search(int news_id)
	{
		News News=NewsDao.dao.news_search( news_id);
		return News;
	}
	/*
	 * (non-Javadoc)
	 * @see com.cdut.logistics.service.interf.businesses.NewsService#news_update(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int)
	 */
	public boolean news_update(int news_id,String title,String url,String content,String img_id,String video_url,int sort)
	{
		boolean is_success = NewsDao.dao.news_update( news_id,title, url, content, img_id, video_url, sort);
		return is_success;
	}
	
	
}
